<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bilibili效果</title>
</head>

<body>
    <div class="con">
        <a href="https://www.bilibili.com/" class="item"><img src="./images/遥远的她.jpg" alt="遥远的她"></a>
        <a href="https://www.bilibili.com/" class="play-btn"></a>
        <a href="https://www.bilibili.com/" class="mask">
        <h1>她在哪里了</h1>
        <p>远方的她，正无语凝眸，望眼欲穿...</p></a>
    </div>
    <style>
        a {
            text-decoration: none;
            display: block;
        }

        .con {
            position: relative;
            width: 400px;
        }
        .con .item{width: 100%;height: 100%;}

        .con .item img {
            width: 100%;
            height: 100%;
        }

        .play-btn {
            opacity: 0;
            position: absolute;
            width: 56px;
            height: 56px;
            right: 10%;
            bottom: 10%;
            background: url(./images/稍后再看.png) no-repeat center center;
            transition: opacity 0.5s ease-in-out;
        }

        .con:hover .play-btn {
            opacity: 1;
        }

        .mask {
            width: 100%;
            height: 0;
            position: absolute;
            bottom: 0;
            transition: ease-in-out height 0.5s ;
            overflow: hidden;
            opacity: 1;
        }

        .con:hover .mask {
            height: 100%;
        }
    </style>
</body>

</html>